<?php
// +----------------------------------------------------------------------
// | Tplay [ WE ONLY DO WHAT IS NECESSARY ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://tplay.pengyichen.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 听雨 < 389625819@qq.com >
// +----------------------------------------------------------------------
#前台域名
$allow_origin = array(
<<<<<<< HEAD
    'http://121.42.251.110:4646',
    'http://web.ewtouch.com',
    'http://localhost:8080',
    'http://192.168.10.112:8081',
=======
    'http://192.168.10.112:8080',
    'http://localhost:8080',
    'http://192.168.10.112:8081',
    'http://192.168.10.104:8080',
>>>>>>> be121f1a50174d3e8e514ec7d4ab082589e0267f
);
$origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';

if (in_array($origin, $allow_origin)) {
    header('Access-Control-Allow-Origin:' . $origin);
}
//header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Credentials:true');

header('Access-Control-Allow-Headers: X-Requested-With, Content-Type');
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE');
header('Access-Control-Max-Age: ' . 3600 * 24);
#定义主域名
define('DOMAIN', 'http://121.42.251.110:4545');
define('FRDOMAIN','http://121.42.251.110:4646');

// [ 应用入口文件 ]

// 定义应用目录
define('APP_PATH', __DIR__ . '/../app/');
// 定义版本号
define('TPLAY_VERSION', '1.3.2');
//重定义扩展类库目录
define('EXTEND_PATH', __DIR__ . '/../extend/');
//重定义第三方类库目录
define('VENDOR_PATH', __DIR__ . '/../vendor/');
// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';